﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SIA.HwAccess
{
    public delegate void SignalEvent(IHwSignal signal);


    public enum eReadWrite { NONE, READ, WRITE, READWRITE }; 
    public interface IHwSignal : IHwResource
    {
        IHwConnection Connection { get; set; }
        eReadWrite ReadWrite { get; }
        Object Value { get; set; }

        ///<summary>Evento al cambio Valore</summary>
        event SignalEvent ValueChange;
    }
    public interface IAnalogSignal : IHwSignal
    {
        Double DoubleValue { get; set; } 
    }
    public interface IDigitalSignal : IHwSignal
    {
        Boolean DigitalValue { get; set; }

        ///<summary>Evento al cambio Valore</summary>
        event SignalEvent RisePositiveFront;
        ///<summary>Evento al cambio Valore</summary>
        event SignalEvent RiseNegativeFront;
    }
    public interface IStreamSignal : IHwSignal
    {
        String StringValue { get; set; } 
    }
    public interface IIntegerSignal : IHwSignal
    {
        int IntValue { get; set; } 
    }    
}
